# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Mario A. Vazquez <mario_vazq@hotmail.com>

pkgbase=pyxdg
pkgname=('python2-pyxdg' 'python-pyxdg')
pkgver=0.27
pkgrel=1
pkgdesc="Python library to access freedesktop.org standards"
arch=('any')
url="http://freedesktop.org/Software/pyxdg"
license=("LGPL")
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz")
sha1sums=('e4afee88cc156da408e10508a1a21b16082781b0')
validpgpkeys=('6391296E3F25C0A721C1F1AFAF88B3AC5DECB224') # Thomas Kluyver

package_python2-pyxdg() {
  depends=('python2')
  conflicts=('pyxdg' 'python2-xdg')
  provides=('pyxdg' 'python2-xdg')
  replaces=('pyxdg' 'python2-xdg<0.26-5')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  python2 setup.py install --prefix=/usr --root="${pkgdir}"
}

package_python-pyxdg() {
  depends=('python')
  conflicts=('python-xdg')
  provides=('python-xdg')
  replaces=('python-xdg<0.26-5')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
}
